PREVIEW: Today, we will be using functions to create a story with different scenes.

  • Click Run to see an example of the project.
  • Look at lines 4, 11, 19, and 29. These are function definitions, which create blocks of code that can be reused.
  • Look at lines 9, 17, 27, and 43. These are function calls, which run the code indented in the function!
  • When you are done, click Submit and Next to move on.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)